<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no">
    <meta content="yes" name="apple-touch-fullscreen"/>
    <title>填写身份证号</title>
    <link rel="stylesheet" href="/static/css/base.css?v={$staticVersion}"/>
    <link rel="stylesheet" type="text/css" media="screen" href="/static/css/swiper-3.3.1.min.css" />
    <link rel="stylesheet" href="/static/css/groupbuying.css?v={$staticVersion}"/>
</head>
<body class="card-id">
   <input type="text" placeholder="身份证号" value="">
   <p class="p10">注：身份证号将用于海淘商品在进入国内时，海关清关使用。请务必填写正确你的身份证号</p>
   <button>完成</button>
</body>

<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/show/gear.js?v={$staticVersion}"></script>
<script>
    $('.card-id button').on('click',function(){
        var id = $('.card-id input').val();
        if(!IdentityCodeValid(id)){
            toast('身份证不合法');
            return;
        }
        $.ajax({
            url: "/gearWeb/addusercardid",
            data: { 'cardid': id},
            context: document.body,
            dataType:'json'
        }).done(function(data){
            if(data.error&&data.error.id==201){
                location.href = "joggers://login/";
                return;
            }
            if(data.result>=0){
                toast('提交成功');
                setTimeout(function(){
                   location.href='/show/groupondetail?flashId={$flashId}&selectsku=true';
                },500)
            }
        }).error(function() {
            toast('error');
        });
    })
</script>
{template 'show/web-gearfooter'}
<script type="text/javascript">
    if(typeof jw === "object" ) {
        jw.api('wv_setnav', JSON.stringify({
            "title": '',
            "nav": getNav([0,1])
        }), '')
    }
</script>